<template>
  <div class="herolist-wai">
    <div class="herolist-conents">
      <ul class="herolist">
        <li v-for="herolist in herolist" :key="herolist.id">
          <a href>
            <img :src="herolist.img" alt style="width:91px; height:91px" />
            {{herolist.cname}}
          </a>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data: () => ({
    herolist: []
  }),
  created () {
    this.getdata()
  },
  methods: {
    async getdata () {
      const data = await this.$axios.get('http://localhost:8080/getdata')
      this.herolist = data.data
    }
  }
}
</script>
<style lang="less" scoped>
.herolist-wai {
  .herolist-conents {
    margin-top: 40px;
    .herolist {
      margin: 0;
      padding: 0;
      margin-right: -50px;
      overflow: hidden;
      li {
        float: left;
        width: 87px;
        margin-bottom: 34px;
        margin-right: 30px;
        list-style: none;
        a {
          display: block;
          width: 100%;
          text-align: center;
          text-decoration: none;
          color: #000;
          img {
            width: 83px;
            height: 83px;
            border: 2px solid #258df2;
            border-radius: 10px 0 10px 0;
          }
        }
      }
    }
  }
}
</style>
